﻿<%@ Page Title="" Language="C#" MaintainScrollPositionOnPostback="true" MasterPageFile="~/companypart/CompanyMastermaster.master" AutoEventWireup="true" CodeFile="SubscriptionInternals.aspx.cs" Inherits="SubscriptionInternals" meta:resourcekey="PageResource1"%>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<%@ Register Src="~/ImageListItem.ascx" TagName="ImageListItem" TagPrefix="UserControl" %>



<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
<title>التوزيع الداخلى</title>
    <style type="text/css">
     tr .tabbone4{
	 background-color:#028ac5;
	 font-size:11px;
	 line-height:20px;
	 font-family:Tahoma;
  	 color:#fff;
  	 text-align:right;
	
}
.adel4{
	background-color:#ededed;
	font-size:10px;
	color:#084f86;
	font-family:Tahoma;
	height:30px;
	text-align:  right;
}
         .zr3 {
	background-image:url('../images/button2.png');
	display:block;
	float:right;
	 padding: 0px 10px 0px 10px;
	height:21px;
	text-align:center;
	color:#fff;
	text-shadow:1px 1px 0px #003a5e;
	margin-right:2px;
	line-height:19px;
	font-weight:bold;
	text-decoration:none;
	font-family:Tahoma;
	font-size:12px;


}
.zr3:hover ,.zr3:active {
	background-image:url('../images/button2.png');
	text-shadow:1px 1px 0px #003a5e;
	background-position:0px -21px;
	
}
  .stylelabel3
       {
       	color:#064c66;
	 font-weight:bold;
	 direction:rtl;
	 text-align:right;
       	}
             .tab3{
	width:815px;
 direction:rtl;
 border:1px #ccc solid;
 border-radius:5px;
 }

tr .tabbone3{
	 background-color:#028ac5;
	 font-size:11px;
	 line-height:20px;
	 font-family:Tahoma;
  	 color:#fff;
  	 text-align:center;
	
}
 .req3
       {
           color:Red;
       } 
.adel3{
	background-color:#ededed;
	font-size:10px;
	color:#084f86;
	font-family:Tahoma;
	height:30px;
	text-align:  center;
}
.he3{
	background-color:#fff;
	padding:5px;
	font-family:Tahoma;
	font-size:14px;
	font-weight:bold;
}
.txt3
{
    border:1px solid black;
    }
        

        .lok
     {
	display: none;
	color: red;
     }
        .jqmWindow {
    display: none;
    
    position: fixed;
    top: 17%;
    left: 50%;
    
    margin-left: -300px;
    width: 800px;
    
    background-color: #EEE;
    color: #333;
    border: 1px solid black;
    padding: 12px;
}
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    
    <br />
    <table class="tab3">
      <tr >
             <td class="tabbone3"> <asp:Label   ID="lblpaidfees" runat="server" Text="المنتج" meta:resourceKey="name" /></td>
        
             <td class="tabbone3"> <asp:Label   ID="lblendsub" runat="server" Text="نهاية الاشتراك" meta:resourceKey="lblendsub" /></td>
   
             <td class="tabbone3"> <asp:Label   ID="lblcopyno" runat="server" Text="عدد النسخ" meta:resourceKey="copy" /></td>

      </tr>
      <tr>
      <td class="adel3">  <asp:Label   ID="product" runat="server" /></td>
       <td class="adel3"> <asp:Label   ID="ends" runat="server" /></td>
                   <td class="adel3"> <asp:Label   ID="copys" runat="server" /></td>
                      
                           
                                  </tr>
      </table>
      <br />
          <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False"
                    DataSourceID="SqlDataSource1" 
                     OnRowCreated="GridView1_RowCreated"
                    AllowPaging="True" EnableModelValidation="True" 
        GridLines="None">
                    <PagerSettings FirstPageText="الاولى" LastPageText="الاخيرة"
                        NextPageText="التالى" PreviousPageText="السابق" />
                    <Columns>
                        <asp:TemplateField>
                            <HeaderTemplate>
                               
                                    <table class="tab3">
                                        <tr class="tabbone3">
                                            <td style="width:200px">
                                                <asp:Label ID="lblname" runat="server" Text="الاسم" meta:resourceKey="lblname"
                                                     />
                                            </td>
                                            <td style="width:200px">
                                                <asp:Label ID="lbldec" runat="server" Text="الوصف" meta:resourceKey="lbldec"  />
                                            </td>
                                           
                                            <td style="width:200px">
                                              
                                                
                                                <asp:Label ID="lblregdate" runat="server" Text="النشر والتوزيع" meta:resourceKey="lblregdate"
                                                   />
                                            </td>
                                            <td style="width:150px">
                                                <asp:Label ID="copy" runat="server" Text="عدد النسخ" meta:resourceKey="copy"
                                                     />
                                            </td>
                                            <td style="width:50px">
                                            <asp:Label ID="Label10" runat="server" Text="عرض" meta:resourceKey="lblshow" />
                                            </td>
                                          
                                        </tr>
                                    </table>
                              
                            </HeaderTemplate>
                            <ItemTemplate>
                                <table class="tab3" >
                                    <tr class="adel3">
                                        <td style="width:200px">
                                            <asp:Label  ID="Label11" runat="server" Text='<%# HttpUtility.HtmlEncode(Convert.ToString(Eval("name"))) %>'
                                                 />
                                        </td>
                                        <td style="width:200px">
                                            <asp:Label  ID="Label10" runat="server" Text='<%# HttpUtility.HtmlEncode(Convert.ToString(Eval("internal"))) %>'
                                                 />
                                        </td>
                                        <td style="width:200px">
                                            <asp:Label  ID="startofsub" runat="server" Text='<%# HttpUtility.HtmlEncode(Convert.ToString(Eval("regdate"))) %>'
                                                 />
                                        </td>
                                        <td style="width:150px; padding-top:10px;">
                                          <asp:TextBox CssClass="txt3" ID="copyno" runat="server" Text="0"></asp:TextBox>
       
        <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" 
            ErrorMessage="<%$ Resources:Resource, required %>" 
            ControlToValidate="copyno"   ValidationGroup="go"  Visible="true"></asp:RequiredFieldValidator>
                                        </td>
                                       <td style="width:50px" valign="middle">
                                       <asp:CheckBox runat="server" ID="chkAdd"   CausesValidation="true"  ValidationGroup="go"  ToolTip='<%# String.Format("{0} , {1}", Eval("id"), Eval("name")) %>'  AutoPostBack="true" oncheckedchanged="CheckBox1_CheckedChanged"  ></asp:CheckBox> 
                                       </td>
                                      
                                    </tr>
                                </table>
                            </ItemTemplate>
                        </asp:TemplateField>
                   
                       
                    </Columns>
                </asp:GridView> 
                <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
                    SelectCommand="select * from  internal_distribution where id not in(select internal_id from  internal_copies where company_product_id=@proid ) ">
                     <SelectParameters>
                     <asp:QueryStringParameter Name="proid" QueryStringField="proid"  Type="Int64" /><%--
                             <asp:SessionParameter Name="company_id" SessionField="company_id"  Type="Int32" />
        --%>
        </SelectParameters>
                </asp:SqlDataSource> 
                <br />
               <asp:Panel ID="ListT" runat="server" Height="200px" Width="500" BorderStyle="Groove"
                                EnableViewState="true" BorderColor="Black" BorderWidth="2px"
                       Direction="RightToLeft"  ScrollBars="Both" Wrap="true" >
                            </asp:Panel>
                            </td>     
      

    <table>
    
    <tr>
<td align="center">  
    <asp:Button  ID="save" CssClass="zr3" runat="server" Text="حفظ"  meta:resourceKey="lblsave" onclick="save_Click" /> 
      
    
               
    
               </td>
               
</tr>
</table>

</asp:Content>

